﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SendMailServer
{
    internal class Logger
    {
        public static void WriteLine(string message)
        {
            string fileName = "D:\\Program Files\\SendMailServer\\log.txt";
            message = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + message + "\r\n";
            if (File.Exists(fileName) == false)
            {
                File.WriteAllText(fileName, message);
            }
            else
            {
                File.AppendAllText(fileName, message);
            }
        }
    }
}
